﻿<Window x:Class="Multitouch.Configuration.WPF.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		Title="Multitouch configuration"
		mc:Ignorable="d"
		d:DesignHeight="415" d:DesignWidth="660" Width="700" Height="350">
    <Grid Margin="10,10,10,10">
		<Grid.RowDefinitions>
    		<RowDefinition Height="Auto" MinHeight="22.968"/>
    		<RowDefinition Height="Auto" MinHeight="25.767"/>
    		<RowDefinition Height="*"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="0.472*"/>
    		<ColumnDefinition Width="Auto"/>
    		<ColumnDefinition Width="0.528*"/>
    	</Grid.ColumnDefinitions>
    	<ListBox Grid.Row="2"
				 ItemsSource="{Binding Path=AvailableProviders, Mode=Default}"
				 SelectedItem="{Binding Path=SelectedProvider, Mode=Default}"
				 ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{DynamicResource InputProviderContainerStyle}"/>
    	<TextBlock HorizontalAlignment="Left" Text="Available devices" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="1" Margin="5,5,5,5"/>
    	<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="Wrap" FontSize="18" FontWeight="Bold" Text="Input device selection" Margin="5,5,5,5" Grid.ColumnSpan="3"/>
    	<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Grid.Column="2" VerticalAlignment="Center" Text="Active device" Margin="5,5,5,5" Grid.Row="1"/>
    	<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="1">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="0.5*"/>
    			<ColumnDefinition Width="0.5*"/>
    		</Grid.ColumnDefinitions>
    		<Grid.RowDefinitions>
    			<RowDefinition Height="*"/>
    			<RowDefinition Height="Auto"/>
    		</Grid.RowDefinitions>
    		<ContentPresenter Content="{Binding Path=CurrentProvider, Mode=Default}" ContentTemplate="{DynamicResource SelectedInputProviderTemplate}" VerticalAlignment="Stretch" Margin="0,0,0,16.56" Grid.ColumnSpan="2" />
    		<Button HorizontalAlignment="Center" VerticalAlignment="Center" Content="Restart service" Grid.Row="1" FontSize="14" Command="{Binding Path=RestartService, Mode=Default}"/>
    		<Button Content="Configure device" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding Path=ShowConfiguration, Mode=Default}"/>
    	</Grid>
    	<Button HorizontalAlignment="Center" VerticalAlignment="Center" Content="Button" Grid.Row="2" Grid.Column="1" Template="{DynamicResource ActivateButtonTemplate}" Width="50" Height="50" Margin="5,5,5,5" Command="{Binding Path=SetCurrentProvider, Mode=Default}"/>
	</Grid>
</Window>